*Sacrificing Civilians to Save Soldiers: Public Support for Counterterrorism/Counterinsurgency Operations in Mosul and Basra, Iraq
*Replication Instructions

*Sam Whitt, Vera Mironova, Douglas Page

*Below are instructions for replicating all manuscript and online appendix tables and figures in STATA using the dataset "TPV Soldiers Replication data.dta". Please contact Sam Whitt (swhitt@highpoint.edu) for questions regarding data replication. See also the dofile "TPV Soldiers Replication do file". 
*Note: You may need to install STATA packages for the cibar, catcibar, and iebaltab commands. Use findit with the command name to identify and download the appropriate packets to install. 
*"Stata user-generated commands to install for replication purposes"

*"cibar"
ssc install cibar, replace

*"iebaltab from ietoolkit"
ssc install ietoolkit, replace

*"catcibar"
net install catcibar, from("https://aarondwolf.github.io/catcibar") replace

*regsensitivity
ssc install regsensitivity, replace

*Manuscript Replication

*In text replication 

*The study was conducted between March 31-April 5, 2022 in Mosul and April 6-April 11 in Basra, with a sample size of 278 and 216, respectively 
tab date if mosul==1
tab date if mosul==0

*We simplify the analysis by combining all four items into a common continuous interim covariance index ranging from 1=strongly oppose to 4=strongly agree (Cronbach's alpha=0.87). 
alpha revdrones revpilots revshelling revdeploysoldiers

*The effect size of the Sacrificing Civilians treatment relative to control is moderate to small (Cohen's d = 0.23), while the effect size of the Saving Soldiers treatment is relatively large (Cohen's d  = 0.51). 
esize twosample alphactoindex if militarytxt~=2, by(militarytxt) unequal
esize twosample alphactoindex if militarytxt~=1, by(militarytxt) unequal

*…the Saving Soldiers treatment effect is significant when compared to the Civilian Casualty treatment as a placebo control with a moderate effect size (Cohen's d = 0.28). 
esize twosample alphactoindex, by(civsoldiertxt) unequal

*First, we measure trust in the military using the question How much do you trust the Iraqi Armed Forces to do what's best for the country? Response options range on a four-point scale from 1=no trust at all to 4=a great deal, and trust was higher in Mosul (93.5% have a great deal of trust) than in Basra (35.4%). 
tab revtrustarmy if mosul==1
tab revtrustarmy if mosul==0

*Only 3% of people in Mosul and 15% in Basra felt that most people supported ISIS; the vast majority in both Mosul (87%) and Basra (84%) thought that some people supported ISIS, but not a majority. 
tab supportisis if mosul==1
tab supportisis if mosul==0

*Using a composite interim covariance index (see online appendix for details), we find that Mosul residents showed greater concern about protecting others from harm (unpaired t-test = 13.3, p<0.000) than Basra, providing a potential distancing explanation for greater support for CTO/COIN in Mosul than in Basra. 
ttest revalphaprotect, by(mosul) unpaired unequal

*We found that everyone in the Mosul sample experienced at least 1 form of the above victimization, while 71% suffered two and 22% endured three forms of victimization.

*Code to generate additive ISIS victim index (already generated)
*gen addisisvictimall = punishedisis + fampunishedisis + injuredisis + faminjuredisis + famkilledisis + imprisonedisis + fleehomeisis + homedamagedisis + womenabusedisis + injuredlib + faminjuredlib + famkilledlib + homedamagedlib + imprisonedlib + fledhomelib + womenabusedlib + dsexassault
*tab addisisvictimall
*gen addisisvictim3 = addisisvictimall
*replace addisisvictim3  = 3 if addisisvictim3 >3
*tab addisisvictim3 if mosul==1

*The average tolerance score in Mosul was 8.88 (SD=0.13) compared to 4.02 (SD=0.14) in Basra. 
sum revdeathsacceptable if mosul==1
sum revdeathsacceptable if mosul==0

*In Basra, only 5.4% indicated probably not, while 51.4% indicated probably yes, and only 43.2% thought that the use of advanced weaponry definitely reduced soldier deaths. In Mosul, 65.3% stated probably not, 29.7% probably yes, and only 5.1% definitely yes. 
tab lesssoldierdeaths if mosul==0
tab lesssoldierdeaths if mosul==1

*Manuscript Tables and Figures

*Figure 2. Support for CTO/COIN

*Figure 2a.

catcibar revdrones revpilot revshelling revdeploysoldiers, over(mosul)

*Note: additional formatting required

*Figure 2b. 

cibar alphactoindex, over1(militarytxt0)

*Note: additional formatting required

*Figure 3 Tolerance of civilian casualties 

*Figure 3a. Histograms

histogram revdeathsacceptable if mosul==0, discrete percent addlabels addlabopts(mlabformat(%2.1f))
graph save g1
histogram revdeathsacceptable if mosul==1, discrete percent addlabels addlabopts(mlabformat(%2.1f))
graph save g2
graph combine "g1.gph" "g2.gph"
*Note: additional formatting required using 

*Figure 3b. ATEs

cibar revdeathsacceptable, over1(civsoldiertxt)
cibar revdeathsacceptable, over1(civsoldiertxt) over2(mosul)

*Figure 4. CTO/COIN support treatment compliance

cibar alphactoindex, over1(lesssoldierdeaths)
graph save g3
cibar revdeathsacceptable, over1(lesssoldierdeaths)
graph save g4
graph combine "g3.gph" "g4.gph"
*Note: additional formatting required  

*Table 1. Sample Summary Statistics

sum female age professional laborer unemployed westmosul  if mosul==1
sum female age professional laborer unemployed westmosul  if mosul==0

*Table 2.  Support for CTO/COIN (OLS Regression) 

reg alphactoindex ib3.militarytxt, robust
reg alphactoindex civsoldiertxt, robust
reg alphactoindex ib3.militarytxt mosul, robust
reg alphactoindex mosul ib3.militarytxt revtrustarmy supportisis revalphaprotect addisisvictim3 female age education unemployed sunni arab , robust

*Table 3. Tolerance of civilian casualties (OLS regression)

reg revdeathsacceptable civsoldiertxt, robust
reg revdeathsacceptable civsoldiertxt mosul, robust
reg alphactoindex civsoldiertxt, robust
reg alphactoindex civsoldiertxt revdeathsacceptable, robust
reg alphactoindex civsoldiertxt revdeathsacceptable mosul revtrustarmy, robust

*Online Appendix Replication

*Sample Summary Statistics

sum female age professional laborer unemployed westmosul  if mosul==1
sum female age professional laborer unemployed westmosul  if mosul==0

*Summary Statistics-Mosul

sum revprotectsunni-revprotectgay revalphaprotect supportisis punishedisis dsexassault fampunishedisis faminjuredisis famkilledisis womenabusedisis fleehomeisis homedamagedisis injuredlib faminjuredlib famkilledlib homedamagedlib imprisonedlib fledhomelib homelootedlib  female age education professional laborer unemployed westmosul  if mosul==1

*Protection from Harm Index Construction 

alpha revprotectsunni-revprotectgay
factor revprotectsunni-revprotectgay
kdensity revalphaprotect

*CTO/COIN Index Construction 

alpha revdrones revpilots revshelling revdeploysoldiers
factor revdrones revpilots revshelling revdeploysoldiers

*Experimental Robustness Checks

*The Table below shows how the treatment effects are consistent across index components using OLS Regression.
reg revdrones ib3.militarytxt, robust
reg revpilots ib3.militarytxt, robust
reg revshelling ib3.militarytxt, robust
reg revdeploysoldiers ib3.militarytxt, robust
reg alphactoindex ib3.militarytxt, robust

*Results are also robust to ordered-logit specification.
ologit revdrones ib3.militarytxt, robust
ologit revpilots ib3.militarytxt, robust
ologit revshelling ib3.militarytxt, robust
ologit revdeploysoldiers ib3.militarytxt, robust
ologit alphactoindex ib3.militarytxt, robust

*Support for Drones, Aerial Attacks, Artillery Assaults (paired T-tests)
ttest revdrones = revdeploysoldiers if mosul==0
ttest revpilots = revdeploysoldiers if mosul==0
ttest revshelling = revdeploysoldiers if mosul==0

ttest revdrones = revdeploysoldiers if mosul==1
ttest revpilots = revdeploysoldiers if mosul==1
ttest revshelling = revdeploysoldiers if mosul==1

*Experimental Balance tests

iebaltab female age education unemployed sunni arab addisisvictim3 mosul revtrustarmy, groupvar(militarytxt0) vce(cluster location) savexlsx(balancepooled)

*Treatment Effect Estimation Adjusted for Imbalances (Sacrificing Civilians vs. Control)
*DV=CTO/COIN Support

teffects ipw (alphactoindex ) (civiliantxt  female, logit), vce(robust)
teffects aipw (alphactoindex female) (civiliantxt female, logit), vce(robust)
teffects ipwra (alphactoindex female, linear ) (civiliantxt female, logit), vce(robust)
teffects psmatch (alphactoindex) (civiliantxt female, logit), vce(robust)

*Treatment Effect Estimation Adjusted for Imbalances (Civilian vs Soldier Treatments)
*DV = CTO/COIN Support 

teffects ipw (alphactoindex ) (civsoldiertxt  education, logit), vce(robust)
teffects aipw (alphactoindex education) (civsoldiertxt education, logit), vce(robust)
teffects ipwra (alphactoindex education, linear ) (civsoldiertxt education, logit), vce(robust)
teffects psmatch (alphactoindex) (civsoldiertxt education, logit), vce(robust)

*Treatment Effect Estimation Adjusted for Imbalances (Civilian vs Soldier Treatments)
*DV = Tolerance of Civilian Casualties

teffects ipw (revdeathsacceptable ) (civsoldiertxt  education, logit), vce(robust)
teffects aipw (revdeathsacceptable  education) (civsoldiertxt education, logit), vce(robust)
teffects ipwra (revdeathsacceptable  education, linear ) (civsoldiertxt education, logit), vce(robust)
teffects psmatch (revdeathsacceptable ) (civsoldiertxt education, logit), vce(robust)

*Treatment Effect Moderation

reg alphactoindex ib3.militarytxt##mosul, robust
reg alphactoindex ib3.militarytxt##c.revtrustarmy, robust
reg alphactoindex ib3.militarytxt##c.revalphaprotect, robust
reg alphactoindex ib3.militarytxt##c.addisisvictim3, robust
reg alphactoindex ib3.militarytxt##c.supportisis, robust

*Demographic Moderation (OLS Regression)
reg alphactoindex ib3.militarytxt##female, robust
reg alphactoindex ib3.militarytxt##c.age, robust
reg alphactoindex ib3.militarytxt##c.education, robust
reg alphactoindex ib3.militarytxt##unemployed, robust
reg alphactoindex ib3.militarytxt##sunni, robust
reg alphactoindex ib3.militarytxt##arab, robust

*Mediation Analysis

*Structural Equation Model

sem (revdeathsacceptable -> alphactoindex, ) (civsoldiertxt -> alphactoindex, ) (civsoldiertxt -> revdeathsacceptable, ), vce(robust) nocapslatent
estat teffects
medsem, indep(civsoldiertxt) med(revdeathsacceptable) dep(alphactoindex) stand rit zlc

*Potential Outcomes
mediate (alphactoindex , linear) (revdeathsacceptable  , linear) (civsoldiertxt), vce(robust) all aequations

*Hicks/Tingley 

medeff (regress revdeathsacceptable civsoldiertxt) (regress alphactoindex civsoldiertxt revdeathsacceptable ), treat(civsoldiertxt) mediate(revdeathsacceptable) vce(robust)

medsens (regress revdeathsacceptable civsoldiertxt) (regress alphactoindex civsoldiertxt revdeathsacceptable ), treat(civsoldiertxt) mediate(revdeathsacceptable)

*Sensitivity Analysis 

regsensitivity alphactoindex mosul ib3.militarytxt  female age education unemployed sunni arab, 

regsensitivity bounds alphactoindex mosul ib3.militarytxt  female age education unemployed sunni arab, oster

*Power Calculations

*Power  - CTO/COIN

sum alphactoindex if mosul==1
sum alphactoindex if mosul==0
power twomeans 3.79 2.87, sd1(0.33) sd2(0.37) n1(218) n2(208)

*Power Casualties

sum revdeathsacceptable if mosul==1
sum revdeathsacceptable if mosul==0
power twomeans 8.88 4.02, sd1(1.89) sd2(1.56) n1(196) n2(120)

*Experimental ATEs

oneway alphactoindex militarytxt, tabulate
power oneway 3.40 3.55 3.26, n1(162) n2(156) n3(168) varerror(0.32)

*twoway factorial

anova alphactoindex militarytxt##mosul
power twoway 3.8 3.84 3.72 \ 2.96 2.82 2.81, n(486)  varerror(0.12)
power twoway 3.8 3.84 3.72 \ 2.96 2.82 2.81, n(486) cellweights( 2 3 2 \ 2 1 2) showcellsizes varerror(0.12)

*subgroup of Save Soldiers vs. Sacrificing Civilians 

sum revdeathsacceptable if militarytxt==1
sum revdeathsacceptable if militarytxt==2
power twomeans 6.21 7.90, sd1(2.69) sd2(2.96) n1(162) n2(154)

*Predictors of Casualty Tolerance

reg revdeathsacceptable civsoldiertxt, robust
reg revdeathsacceptable civsoldiertxt mosul, robust
reg revdeathsacceptable civsoldiertxt##c.revtrustarmy mosul, robust
reg revdeathsacceptable civsoldiertxt##c.revtrustarmy mosul supportisis revalphaprotect addisisvictim3 female age education unemployed sunni arab , robust

ologit revdeathsacceptable civsoldiertxt, robust
ologit revdeathsacceptable civsoldiertxt mosul, robust
ologit revdeathsacceptable civsoldiertxt##c.revtrustarmy mosul, robust
ologit revdeathsacceptable civsoldiertxt##c.revtrustarmy mosul supportisis revalphaprotect addisisvictim3 female age education unemployed sunni arab , robust

*Predictors of Military Trust

reg  revtrustarmy mosul supportisis revalphaprotect addisisvictim3 female age education unemployed sunni arab , robust
ologit  revtrustarmy mosul supportisis revalphaprotect addisisvictim3 female age education unemployed sunni arab , robust


*Balance Tests – Mosul versus Basra

*Next, we show that the Mosul/Basra effect on CTO/COIN support is robust to adjustments for imbalances on gender, age, and Sunni religion

teffects ipw (alphactoindex) (mosul  female age sunni, logit), vce(robust)
teffects aipw (alphactoindex female age sunni) (mosul  female age sunni, logit), vce(robust)
teffects ipwra (alphactoindex female age sunni, linear ) (mosul  female age sunni, logit), vce(robust)
teffects psmatch (alphactoindex ) (mosul  female age sunni, logit), vce(robust)

*Next, we show that the Mosul/Basra effect on causality tolerance is robust to adjustments for imbalances on gender, age, and Sunni religion

teffects ipw (revdeathsacceptable) (mosul  female age sunni, logit), vce(robust)
teffects aipw (revdeathsacceptable female age sunni) (mosul  female age sunni, logit), vce(robust)
teffects ipwra (revdeathsacceptable female age sunni, linear ) (mosul  female age sunni, logit), vce(robust)
teffects psmatch (revdeathsacceptable) (mosul  female age sunni, logit), vce(robust)

log close


